#!/bin/bash

FRAPPE_VERSION=${1}

ERPNEXT_VERSION=${2}

## 3. Tag and push
docker tag xdc-erpnext-nginx:${ERPNEXT_VERSION} registry.cn-shanghai.aliyuncs.com/xdicloud/xdc-erpnext-nginx:${ERPNEXT_VERSION}
docker push registry.cn-shanghai.aliyuncs.com/xdicloud/xdc-erpnext-nginx:${ERPNEXT_VERSION}

docker tag xdc-erpnext-nginx:${ERPNEXT_VERSION} registry.cn-shanghai.aliyuncs.com/xdicloud/xdc-erpnext-nginx:${FRAPPE_VERSION}
docker push registry.cn-shanghai.aliyuncs.com/xdicloud/xdc-erpnext-nginx:${FRAPPE_VERSION}

docker tag xdc-erpnext-worker:${ERPNEXT_VERSION} registry.cn-shanghai.aliyuncs.com/xdicloud/xdc-erpnext-worker:${ERPNEXT_VERSION}
docker push registry.cn-shanghai.aliyuncs.com/xdicloud/xdc-erpnext-worker:${ERPNEXT_VERSION}

docker tag xdc-erpnext-worker:${ERPNEXT_VERSION} registry.cn-shanghai.aliyuncs.com/xdicloud/xdc-erpnext-worker:${FRAPPE_VERSION}
docker push registry.cn-shanghai.aliyuncs.com/xdicloud/xdc-erpnext-worker:${FRAPPE_VERSION}